Release 10.1A: OpenEdge Development:
Progress 4GL Handbook
Using the Progress Unknown value
Although the ShipDate is displayed as being blank in these cases, the value stored in the database isn’t a blank value, because this is a date, not a character value. If you were to add an expression to your code to compare the ShipDate to a blank value, you would get your very first Progress 4GL compiler error:
Whenever you press the F2 key to run your procedure, Progress performs a syntax validation. If it can’t properly process the code you’ve written, you get an error such as this one:
![]()
In this case, Progress sees that you’re trying to compare a field defined to be a date with a character string constant, and these don’t match. To correct this, you need to change the nature of your comparison.
The value stored in the database to represent a value that isn’t defined is called the Unknown value. In 4GL statements you represent the Unknown value with a question mark (?). Note that you don’t put quotation marks around the question mark; it acts as a special symbol on its own. It is not equal to any defined value. In the 4GL, you write a statement that looks as though you are comparing a value to a question mark, such as
IF ShipDate = ?,but in fact the statement is asking if the ShipDate has the Unknown value, which means it has no particular value at all. The Unknown value is like theNULLvalue in SQL, and the expressionIF ShipDate = ?is like the SQL expressionIF ShipDate IS NULL.
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |